		// create angular app
			var validationApp = angular.module(' ', []);
			// create angular controller
			validationApp.controller('mainForm', function($scope,$http) {
				// function to submit the form after all validation has occurred			

				$scope.ValidateRegistration = function(isValid) {
					
					// check to make sure the form is completely valid
		            if (isValid){
		            	
						$http.post("registration", 
		                        {
							"Username": $scope.Username,"Password":$scope.Password,
							"Nickname": $scope.Nickname,
							"Photo": $scope.Photo,"Description":$scope.Description,
							
		                            //params: {Username: $scope.Username ,Password:$scope.Password},
		                            // Passing the headers to the server for some prcessing
		                            
		                        }).success(function(data, status, headers, config) {
		                            // On success updating the Employee Object.
		                            //$scope.employee = data;
		                        	alert("success");
		                        }) 
		                      .error(function(data, status, headers, config) {
		                          alert("failure");
		                        });
	                	
		            }    

				};

			});